﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;

namespace Agresso.Interface.Layer.Domain
{
    public class i_winsds_itemcode_account_mapping
    {
        public int id = 0;
        public string itemCode = "";
        public string account = "";
        public string dim_2 = "";
        public DateTime created_date = DateTime.Now;
        public DateTime modified_date = new DateTime(1900, 1, 1);

        public i_winsds_itemcode_account_mapping() { }
        public i_winsds_itemcode_account_mapping(SqlDataReader rd)
        {
            id = rd["id"] is DBNull ? id : Convert.ToInt32(rd["id"]);
            itemCode = rd["itemCode"] is DBNull ? itemCode : rd["itemCode"].ToString();
            account = rd["account"] is DBNull ? account : rd["account"].ToString();
            dim_2 = rd["dim_2"] is DBNull ? dim_2 : rd["dim_2"].ToString();
            created_date = rd["created_date"] is DBNull ? created_date : Convert.ToDateTime(rd["created_date"]);
            modified_date = rd["modified_date"] is DBNull ? modified_date : Convert.ToDateTime(rd["modified_date"]);
        }
    }
}
